package com.yin.myproject.collection;

import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Eason
 * @create 2018-05-11 9:48
 **/
public class ConCurrentHashMapDemo {
    public static void main(String[] args) {
        System.out.println(1);
        ConcurrentHashMap<String, String> hashMap = new ConcurrentHashMap<>();
        for (int i = 0; i < 10000; i++) {
            String s = UUID.randomUUID().toString();
            hashMap.put(s, s);
        }

        for (String keySetView:hashMap.keySet()) {
            System.out.println(keySetView+":"+hashMap.get(keySetView));
        }
    }
}
